Skip to content

Upgrade all aptos dependencies to the latest, prep for 7.0.0 release#844

Open
gregnazario wants to merge 7 commits intomainfrom
update-to-latest-deps
Open

Upgrade all aptos dependencies to the latest, prep for 7.0.0 release#844
gregnazario wants to merge 7 commits intomainfrom
update-to-latest-deps

Conversation

@gregnazario
Copy link
Collaborator

Description

This gets ready for a 7.0.0 release, and deprecates support below Node 22 (which is EOL end of April)

This cleans up tree shaking and configuration for both Aptos client and Aptos CLI. We will need more tree shaking work within the Aptos TS SDK in the future, but it requires a major rewrite since we have so many circular and barrel paths.

Test Plan

Related Links

Checklist

  • Have you ran pnpm fmt?
  • Have you updated the CHANGELOG.md?

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Prepares the TS SDK for the 7.0.0 release by upgrading Aptos dependencies and aligning build/TypeScript settings with a Node 22+ baseline.

Changes:

  • Bump Node engine requirement to >=22 and update pnpm/tooling versions.
  • Upgrade @aptos-labs/aptos-cli and @aptos-labs/aptos-client to new major versions and set package version to 7.0.0.
  • Update build/TS compilation targets and module resolution settings (ES2022, bundler resolution), and remove a standalone signed-integer TypeTag doc.

Reviewed changes

Copilot reviewed 4 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tsup.config.ts Raises build output target to ES2022 to match Node 22+ support.
tsconfig.json Updates TS compiler configuration for ES2022 + bundler-style resolution and stricter module constraints.
package.json Bumps major deps, package version to 7.0.0, and Node engine to >=22; updates pnpm version.
SIGNED_INTEGER_TYPETAGS.md Removes an existing documentation file related to signed integer TypeTags.
.tool-versions Aligns pinned pnpm version with packageManager.
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported
Comments suppressed due to low confidence (1)

SIGNED_INTEGER_TYPETAGS.md:1

  • This PR deletes user-facing documentation for signed integer TypeTags without an obvious replacement in the reviewed diffs. If the feature is still supported, consider moving this content into a more canonical docs location (e.g., README/docs site) and updating any references accordingly; otherwise, add a short note in the changelog/release notes explaining the removal/relocation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

@gregnazario
Copy link
Collaborator Author

@cursoragent address PR comments

@cursor
Copy link

cursor bot commented Mar 14, 2026

Addressed the PR comments with the following changes:

  • Updated CHANGELOG.md with a comprehensive 7.0.0 entry documenting all breaking changes: Node >=22 requirement (dropping Node 20 support), @aptos-labs/aptos-cli upgrade to v2, @aptos-labs/aptos-client upgrade to v3, ES2022 build target, tsconfig modernization, and the removal of SIGNED_INTEGER_TYPETAGS.md.

  • Fixed src/version.ts — it was still set to "6.2.0" and is now updated to "7.0.0" to match package.json.

  • Created upgrade-guides/UPGRADE_GUIDE_7.0.0.md with migration instructions covering the Node.js version requirement, dependency upgrades, build target changes, and module resolution changes (following the same pattern as the existing 6.0.0 upgrade guide).

Open in Web Open in Cursor 

cursoragent and others added 5 commits March 14, 2026 07:59
…, add upgrade guide

- Add comprehensive CHANGELOG.md entry for 7.0.0 documenting all breaking
  changes: Node >=22 requirement, major dependency upgrades (aptos-cli v2,
  aptos-client v3), ES2022 build target, and tsconfig modernization
- Note removal of SIGNED_INTEGER_TYPETAGS.md in changelog
- Update src/version.ts from 6.2.0 to 7.0.0 to match package.json
- Create upgrade-guides/UPGRADE_GUIDE_7.0.0.md with migration instructions

Co-authored-by: Greg Nazario <greg@gnazar.io>
Run pnpm doc to generate TypeDoc documentation for version 7.0.0,
update docs/index.md landing page, and update the latest redirect.
This fixes the check-version CI failure.

Co-authored-by: Greg Nazario <greg@gnazar.io>
tsup's sucrase CJS transformer generates invalid syntax (semicolons inside
`if()` conditions) when esbuild preserves ES2022 class fields. This
manifests as `SyntaxError: Unexpected token ';'` when loading the CJS
bundle. Fix by keeping CJS target at es2020 (so esbuild downlevels class
fields before sucrase processes them) while ESM stays at es2022.

Also fix a multiline template literal in multiKey.ts that was cosmetic
but could cause similar bundler issues.

Co-authored-by: Greg Nazario <greg@gnazar.io>
@aptos-labs/aptos-client@3.0.1 declares undici as an optional peer
dependency but unconditionally requires it in the CJS node entry point.
Add undici ^7.24.1 to the SDK's dependencies so it's available at
runtime for consumers.

Co-authored-by: Greg Nazario <greg@gnazar.io>
aptos-client v3 returns Fetch API Headers objects instead of plain
objects for response.config.headers. Update all client test assertions
to use Headers.get() instead of toHaveProperty() / direct property
access.

- post.test.ts: use headers.get() for all header assertions
- aptosRequest.test.ts: use headers.get() for header/api-key assertions
- get.test.ts: restructure to verify headers on successful response
  instead of inspecting error properties
- errors/index.ts: handle Headers object when reading traceparent for
  error messages

Co-authored-by: Greg Nazario <greg@gnazar.io>
@gregnazario gregnazario requested a review from Copilot March 18, 2026 19:30
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Prepares the TypeScript SDK for a 7.0.0 release by updating dependency/tooling baselines (notably Node >=22) and publishing updated generated TypeDoc docs/assets.

Changes:

  • Add generated TypeDoc output for @aptos-labs/ts-sdk v7.0.0 under docs/@aptos-labs/ts-sdk-7.0.0/
  • Update CHANGELOG.md with a 7.0.0 entry and removal note for signed integer TypeTag standalone docs
  • Bump pnpm version in .tool-versions

Reviewed changes

Copilot reviewed 29 out of 721 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
docs/@aptos-labs/ts-sdk-7.0.0/classes/AnySignature.html Adds generated API docs for AnySignature
docs/@aptos-labs/ts-sdk-7.0.0/classes/AccountSequenceNumber.html Adds generated API docs for AccountSequenceNumber
docs/@aptos-labs/ts-sdk-7.0.0/classes/AccountPublicKey.html Adds generated API docs for AccountPublicKey
docs/@aptos-labs/ts-sdk-7.0.0/classes/AccountAuthenticatorNoAccountAuthenticator.html Adds generated API docs for simulation “no authenticator” variant
docs/@aptos-labs/ts-sdk-7.0.0/classes/AccountAuthenticator.html Adds generated API docs for base authenticator type
docs/@aptos-labs/ts-sdk-7.0.0/classes/AccountAbstractionMessage.html Adds generated API docs for abstraction message container
docs/@aptos-labs/ts-sdk-7.0.0/classes/AbstractSignature.html Adds generated API docs for abstract signature type
docs/@aptos-labs/ts-sdk-7.0.0/classes/AbstractPublicKey.html Adds generated API docs for abstract public key type
docs/@aptos-labs/ts-sdk-7.0.0/assets/navigation.js Adds generated navigation payload for docs site
docs/@aptos-labs/ts-sdk-7.0.0/assets/icons.js Adds generated icons bootstrapper for docs site
docs/@aptos-labs/ts-sdk-7.0.0/assets/highlight.css Adds generated syntax highlighting theme variables
docs/@aptos-labs/ts-sdk-7.0.0/assets/hierarchy.js Adds generated hierarchy payload for docs site
docs/@aptos-labs/ts-sdk-7.0.0/.nojekyll Adds GitHub Pages configuration marker for docs
SIGNED_INTEGER_TYPETAGS.md Removes standalone signed integer TypeTag documentation
CHANGELOG.md Adds 7.0.0 release notes and removal note
.tool-versions Updates pnpm tool version (keeps Node 22)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment on lines +13 to +15
if (el.getAttribute("href").includes("#icon-")) {
el.setAttribute("href", el.getAttribute("href").replace(/.*#/, "#"));
}
</div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Properties</h3><div class="tsd-index-list"><a href="#account" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>account</span></a>
<a href="#aptosconfig" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>aptos<wbr/>Config</span></a>
<a href="#currentnumber" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>current<wbr/>Number</span></a>
<a href="#lastuncommintednumber" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>last<wbr/>Uncomminted<wbr/>Number</span></a>
Comment on lines +33 to +34
</div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4><p>the hex formatas a string prefixed by <code>0x</code>.</p>
<aside class="tsd-sources"><p>Inherited from <a href="Serializable.html">Serializable</a>.<a href="Serializable.html#tostring">toString</a></p><ul><li>Defined in <a href="https://github.com/aptos-labs/aptos-ts-sdk/blob/ad78a81b32576ba48430e9f8903aa6dc23b4f322/src/bcs/serializer.ts#L75">src/bcs/serializer.ts:75</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited"><h3 class="tsd-anchor-link" id="tostringwithoutprefix"><span>to<wbr/>String<wbr/>Without<wbr/>Prefix</span><a href="#tostringwithoutprefix" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited"><li class="tsd-is-inherited"><div class="tsd-signature tsd-anchor-link" id="tostringwithoutprefix-1"><span class="tsd-kind-call-signature">toStringWithoutPrefix</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><a href="#tostringwithoutprefix-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns the hex string representation of the <code>Serializable</code> value without the 0x prefix.</p>
@banool banool self-requested a review March 19, 2026 06:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants